﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WarriorRush.GameDynamics.Effects
{
    public class Silencing : GameEffect
    {

        private SpecialAbility takenAbility;
        public Silencing()
            : base(false)
        {
            Type = EffectType.Silenced;
            Power = 2;
        }

        public override void ModifyStats(CharacterClass character)
        {
            takenAbility = character.OffensiveAbility;
            character.OffensiveAbility = new SpecialAbility();
            base.ModifyStats(character);
        }

        public override void RevertStats(CharacterClass character)
        {
            character.OffensiveAbility = takenAbility;
            takenAbility = null;
            base.RevertStats(character);
        }


        public override GameEffect GetInstance(int power)
        {
            return new Silencing() { Power = Power};
        }
    }
}
